<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateWinRecordTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('win_record', function (Blueprint $table) {
            $table->increments('id')->comment("ID");
            $table->integer('user_id')->comment("中奖用户ID");
            $table->string("nickname",50)->nullable()->comment("用户昵称");
            $table->string("mobile")->nullable()->comment("手机号");
            $table->integer("prize_id")->nullable()->comment("奖品ID");
            $table->string("prize_name")->comment("奖品名称");
            $table->integer("status")->default(0)->comment("状态");
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('win_record');
    }
}
